package start

import (
	"fmt"
	"os"

	"gitee.com/shiwjlinux/arm/conf"
	"github.com/spf13/cobra"
)

var Cmd = &cobra.Command{
	Use:   "start",
	Short: "start arm api server",
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("starting ...")
		configPath := os.Getenv("CONFIG_PATH")
		if configPath == "" {
			configPath = "etc/application.yaml"
		}

		cobra.CheckErr(conf.C().Application.Start())
	},
}

func init() {
	// Cmd.Flags().StringVarP(&)
}
